package com.example.demo03.dao;

import com.example.demo03.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    @Select("select * from user where username=#{username} and password=#{password}")
    User login(User user);

    @Insert("insert into user values (null, #{username}, #{password})")
    Boolean regist(User u);

    @Select("select * from user where username=#{username}")
    User queryByUsername(String username);
}
